package com.xushi.dao;

import com.xushi.model.Template;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("templateDao")
public interface TemplateRepository extends CrudRepository<Template, Integer> {
    List<Template> getTemplatesByUsername(String username);

    Template getTemplateByUsernameAndName(String username, String name);

    Template getTemplateByName(String templateName);

    Template getTemplateById(int id);
}
